package io;

import java.io.*;

/**
 * @Author admin
 * @Date 2019/4/12 9:04
 */
public class T3 {
    public static void main(String[] args) {
        try {
           InputStream in=new FileInputStream("D:\\1.txt");
           InputStreamReader isr=new InputStreamReader(in,"GBK");
           BufferedReader br=new BufferedReader(isr);

           OutputStream out=new FileOutputStream("1.txt");
            OutputStreamWriter osw=new OutputStreamWriter(out,"UTF-8");
            BufferedWriter bw=new BufferedWriter(osw);
            String line;
            while ((line=br.readLine())!=null){
                bw.write(line);
                bw.newLine();
            }
            bw.flush();
        }catch (Exception e){
            e.printStackTrace();
        }finally {

        }
    }
}
